FROM 10.0.100.114/library/php:7.2-cli

RUN apk add --update --no-cache supervisor && \
    rm -rf /var/cache/apk/* /tmp/* /var/tmp/* ~/.pearrc

# Configure supervisord
COPY supervisord.conf /etc/supervisor/
COPY supervisor /etc/supervisor/conf.d/

COPY docker-entrypoint.sh /root/docker-entrypoint.sh
RUN chmod +x /root/docker-entrypoint.sh && \
    mkdir -p /var/log/supervisor/

ENTRYPOINT ["/root/docker-entrypoint.sh"]
